/*
 * @Date: 2024-10-29 18:03:51
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2024-10-29 18:03:53
 * @Description: 
 */

const KNOWN_STATICS = {
  name: true,
  arity: true,
  length: true,
  caller: true,
  callee: true,
  arguments: true,
  prototype: true,
};
export function getOwnPropertyStatics (_obj) {
  let result = [];
  let keys = Object.getOwnPropertyNames(_obj);
  keys = keys.concat(Object.getOwnPropertySymbols(_obj));
  for (let i = 0; i < keys.length; ++i) {
      const key = keys[i];
      if (KNOWN_STATICS[key]) continue;
      result.push(key)
  }
  return result;
}

export const PojoUtils = {
  getOwnPropertyStatics: getOwnPropertyStatics
}
